home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / OS / FWGraphx / Include / FWPicShp.h < prev    next >
Encoding:
Text File  |  1996-04-25  |  2.7 KB  |  101 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWPicShp.h
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWPICSHP_H
  11. #define FWPICSHP_H
  12.  
  13. #ifndef FWSHAPE_H
  14. #include "FWShape.h"
  15. #endif
  16.  
  17. #ifndef FWBNDSHP_H
  18. #include "FWBndShp.h"
  19. #endif
  20.  
  21. #ifndef FWPICTUR_H
  22. #include "FWPictur.h"
  23. #endif
  24.  
  25. //========================================================================================
  26. //    Forward Declarations
  27. //========================================================================================
  28.  
  29. class FW_CGraphicContext;
  30. class FW_CBitmapShape;
  31.  
  32. //========================================================================================
  33. //    class FW_CPictureShape
  34. //========================================================================================
  35.  
  36. class FW_CPictureShape : public FW_CBoundedShape
  37. {
  38. public:
  39.     FW_DECLARE_CLASS
  40.     FW_DECLARE_AUTO(FW_CPictureShape)
  41.  
  42. //----------------------------------------------------------------------------------------
  43. //    Constructors/Destructors
  44. //
  45. public:
  46.     FW_CPictureShape(FW_CPicture picture, const FW_CRect& dstRect);
  47.  
  48.     FW_CPictureShape(const FW_CPictureShape& other);
  49.     FW_CPictureShape(FW_CReadableStream& stream);
  50.  
  51.     virtual ~ FW_CPictureShape();
  52.     
  53. //----------------------------------------------------------------------------------------
  54. //    Operators
  55. //
  56. public:
  57.     FW_CPictureShape& operator=(const FW_CPictureShape& other);
  58.     
  59. //---------------------------------------------------------------------------------------
  60. //    Inherited API
  61. //
  62. public:
  63.     // ----- Rendering -----
  64.     virtual void                 Render(FW_CGraphicContext& gc) const;
  65.     
  66.     // ----- Flatten -----
  67.     virtual void                Flatten(FW_CWritableStream& stream) const;
  68.  
  69. //---------------------------------------------------------------------------------------
  70. //    New API
  71. //
  72. public:
  73.     // ----- Rendering -----
  74.     static void                RenderPicture(FW_CGraphicContext& gc,
  75.                                             FW_CPicture picture,
  76.                                             const FW_CRect& dstRect);
  77.     
  78.     // ----- Copying -----
  79.     virtual FW_CShape*            Copy() const;
  80.     
  81.     // ----- Archiving -----
  82.     static void*                 Read(FW_CReadableStream& stream, FW_ClassTypeConstant type);
  83.  
  84.     // ----- Geometry -----
  85.     void                        SetGeometry(const FW_CPicture& picture, const FW_CRect& dstRect);
  86.     void                         GetGeometry(FW_CPicture& picture, FW_CRect& dstRect) const;
  87.  
  88.     FW_CPicture                    GetPicture() const
  89.                                     {return fPicture;}
  90.     void                        SetPicture(const FW_CPicture& picture)
  91.                                     {fPicture = picture;}
  92.     
  93. //---------------------------------------------------------------------------------------
  94. //    Data Member
  95. //    
  96. private:
  97.     FW_CPicture     fPicture;
  98. };
  99.                 
  100. #endif
  101.